
#ifndef BoundingBox_h
#define BoundingBox_h

#include "HitRecord.h"
#include "RenderContext.h"
#include "Ray.h"

class BoundingBox {
 public:
  BoundingBox();
  BoundingBox(const Point& corner1, const Point& corner2);
  ~BoundingBox();

  void intersect(HitRecord& hit, const RenderContext& context, const Ray& ray) const;
  
  void reset();
  void extend(const Point&);
  void set_corners(const Point& p1, const Point& p2);
  
  Point getMin() const {
    return min;
  }
  Point getMax() const {
    return max;
  }
 private:
  Point min, max;
};

#endif
